<?php
/**
 * pemilu
 * copyright (c) 2013 abie
 *
 * @author abie
 * @date 12/20/13 1:05 AM
 */

class Parpol extends MyModel {

    private static $listNama = array();

    private $nomor;
    private $nama;
    private $logo;

    public static function model() {
        return new Parpol();
    }

    public function findByPk($nomor) {
        $parpol = new Parpol();
        $parpol->nomor = $nomor;
        $parpol->nama = self::$listNama[$nomor - 1];
        $parpol->logo = 'parpol' . $nomor . '.png';
        return $parpol;
    }

    /**
     * @return string[]
     */
    protected function getAllKeys()
    {
        return range(1, 8);
    }
}